package org.jeecg.modules.miniAppCustomerEndPoint.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.miniAppCustomerEndPoint.entity.JxOrderDetailDo;

import java.util.HashMap;
import java.util.List;

public interface JxOrderDetailMapper extends BaseMapper<JxOrderDetailDo> {

    List<HashMap<String, Object>> forkOrders();

    /**
     * 查询截止到当前，该站点当天已经支付的订单数量，此sql的作用仅仅是查询已经支付的订单总个数，用来计算 分页信息
     * @param siteId
     * @param dateFlag
     * @return
     */
    int queryPayedOrdersCount(@Param("siteId") String siteId, @Param("dateFlag") Integer dateFlag);

    List<HashMap<String, Object>> queryOrderByState();

    /**
     * 分页查询，查询截止到当前，该站点当天已经支付的订单
     * @param siteId
     * @param dateFlag
     * @param offset
     * @param limit
     * @return
     */
    List<HashMap<String, Object>> queryPayedOrders(@Param("siteId") String siteId, @Param("dateFlag") Integer dateFlag, @Param("offset") Integer offset, @Param("limit") Integer limit);
}
